export interface ResponseData {
	code: number;
	message: string;
	ok: boolean;
}

// 医院详情数据
export interface HospitalDetail {
	bookingRule: {
		cycle: number;
		releaseTime: string;
		stopTime: string;
		quitDay: number;
		quitTime: string;
		rule: string[];
	};
	hospital: {
		id: string;
		createTime: string;
		updateTime: string;
		isDeleted: number;
		param: {
			hostypeString: string;
			fullAddress: string;
		};
		hoscode: string;
		hosname: string;
		hostype: string;
		provinceCode: string;
		cityCode: string;
		districtCode: string;
		address: string;
		logoData: string;
		intro: string | null;
		route: string;
		status: number;
		bookingRule: null;
	};
}

// 医院详情响应数据
export interface HospitalDetailResponse extends ResponseData {
	data: HospitalDetail;
}

// 医院科室数据
export interface Deparment {
	depcode: string;
	depname: string;
	children: Deparment[] | null;
}

export type DeparmentArr = Deparment[];

// 医院科室响应数据
export interface DeparmentResponseData extends ResponseData {
	data: DeparmentArr;
}

// 验证码响应数据
export interface UserCodeResponseData extends ResponseData {
	data: string;
}

// 用户登录的参数
export interface LoginData {
	phone: string;
	code: string;
}

export interface UserInfo {
	token: string;
	name: string;
	openid?: string;
}

// 用户登录响应数据
export interface LoginResponseData extends ResponseData {
	data: UserInfo;
}

// 微信扫码登录返回数据
export interface WXLogin {
	redirectUri: string;
	appid: string;
	scope: string;
	state: string;
}

// 微信扫码登录响应数据
export interface WXLoginResponseData extends ResponseData {
	data: WXLogin;
}

export interface BaseMap {
	workDateString: string;
	releaseTime: string;
	bigname: string;
	stopTime: string;
	depname: string;
	hosname: string;
}

export interface BookingSchedule {
	workDate: string;
	workDateMd: string;
	dayOfWeek: string;
	docCount: number;
	reservedNumber: number;
	availableNumber: number | null;
	status: number;
}

export interface HospitalWorkResponseData extends ResponseData {
	data: {
		total: number;
		bookingScheduleList: BookingSchedule[];
		baseMap: BaseMap;
	};
}

// 一个医生的数据
export interface Doctor {
	id: string;
	createTime: string;
	updateTime: string;
	isDeleted: number;
	param: {
		dayOfWeek: string;
		depname: string;
		hosname: string;
	};
	hoscode: string;
	depcode: string;
	title: string;
	docname: string;
	skill: string;
	workDate: string;
	workTime: number;
	reservedNumber: number;
	availableNumber: number;
	amount: number;
	status: number;
	hosScheduleId: string;
}

// 医生排班数据响应对象
export interface HospitalDoctorResponseData extends ResponseData {
	data: Doctor[];
}

export interface Patient {
	id: number;
	createTime: string;
	updateTime: string;
	isDeleted: number;
	param: {
		certificatesTypeString: string;
		contactsCertificatesTypeString: string;
		cityString: null;
		fullAddress: string;
		districtString: null;
		provinceString: null;
	};
	userId: number;
	name: string;
	certificatesType: string;
	certificatesNo: string;
	sex: number;
	birthdate: string;
	phone: string;
	isMarry: number;
	provinceCode: null;
	cityCode: null;
	districtCode: null;
	address: string;
	contactsName: string;
	contactsCertificatesType: string;
	contactsCertificatesNo: string;
	contactsPhone: string;
	isInsure: number;
	cardNo: null;
	status: string;
}

export interface PatientInfoResponseData extends ResponseData {
	data: Patient[];
}

export interface DoctorInfoResponseData extends ResponseData {
	data: Doctor;
}
